Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mount addon_config into container #642

Merged
merged 1 commit into from
Oct 27, 2024

Conversation

BigBoot
Copy link
Contributor

@BigBoot BigBoot commented Oct 8, 2024

Fixes #627

@@ -35,7 +47,7 @@
"8099/tcp": "Frontend tcp-listen port"
},
"options": {
"data_path": "/config/zigbee2mqtt",
"data_path": "/addon_config/zigbee2mqtt",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be breaking for existing installations, I've tried updating from an older version and the data_path changes to /addon_config/zigbee2mqtt which will result in a clean instance.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I gave this a few more tests and it seems like the path does indeed get overridden if no option is ever changed, since I'm not using the default mqtt setup I've always changed that and never noticed...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added an automatic migration to the entrypoint script

@@ -1,3 +1,14 @@
## [Unreleased]
- ⚠️ **Breaking changes**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be removed now since it's not breaking anymore


bashio::log.info "Configuration migrated successfully."
bashio::log.info "Deleting old configuration from /config/zigbee2mqtt"
rm -rf /config/zigbee2mqtt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we keep the directory for some version to allow downgrades? Or does this directory get restored when you restore a backup?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A full Home Assistant backup would restore the folder, just restoring the addon would not. I wasn't sure whether to keep it or delete the folder, but I fear keeping it will result in users just upgrading without reading the release notes and then wondering why their settings don't get applied/the folder doesn't reflect changes/logs not getting stored etc...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, so we should be a bit cautious with this since you cannot downgrade anymore. Maybe release this together with z2m 2.0.0? (Koenkk/zigbee2mqtt#24198)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an estimated timeframe for 2.0?

Maybe it would make sense to get just the additional mount point merged now so it's possible to manually configure the addon to use the addon_config dir and then update the default/add the automatic migration for 2.0?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an estimated timeframe for 2.0?

In a few months (you can track progress here: Koenkk/zigbee2mqtt#24198)

Maybe it would make sense to get just the additional mount point merged now so it's possible to manually configure the addon to use the addon_config dir and then update the default/add the automatic migration for 2.0?

Sounds good!

@Koenkk Koenkk merged commit a9a141c into zigbee2mqtt:master Oct 27, 2024
11 checks passed
@Koenkk
Copy link
Contributor

Koenkk commented Oct 27, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Backup of Zigbee2mqtt addon does not contain eg. friendly names of devices
2 participants